home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / graphics / strfld / main.frm (.txt) next >
Encoding:
Visual Basic Form  |  1994-07-07  |  2.8 KB  |  91 lines

  1. VERSION 2.00
  2. Begin Form main 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "StrField"
  5.    ClientHeight    =   3360
  6.    ClientLeft      =   4590
  7.    ClientTop       =   1800
  8.    ClientWidth     =   4530
  9.    Height          =   3855
  10.    Left            =   4485
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   3360
  13.    ScaleWidth      =   4530
  14.    Top             =   1410
  15.    Width           =   4740
  16.    Begin TextBox Text3 
  17.       Height          =   285
  18.       Left            =   180
  19.       TabIndex        =   6
  20.       Text            =   "10"
  21.       Top             =   2220
  22.       Width           =   4215
  23.    End
  24.    Begin TextBox Text2 
  25.       Height          =   285
  26.       Left            =   180
  27.       TabIndex        =   4
  28.       Text            =   ","
  29.       Top             =   1560
  30.       Width           =   4215
  31.    End
  32.    Begin TextBox Text1 
  33.       Height          =   855
  34.       Left            =   180
  35.       MultiLine       =   -1  'True
  36.       ScrollBars      =   2  'Vertical
  37.       TabIndex        =   1
  38.       Text            =   "abc,def,ghi,jkl,mno,pqr,stu,vwx,yz,123,456,789,012,345,678,901,234,567,890"
  39.       Top             =   360
  40.       Width           =   4215
  41.    End
  42.    Begin CommandButton Command1 
  43.       Caption         =   "StrField"
  44.       Height          =   435
  45.       Left            =   1620
  46.       TabIndex        =   0
  47.       Top             =   2700
  48.       Width           =   1335
  49.    End
  50.    Begin Label Label3 
  51.       BackStyle       =   0  'Transparent
  52.       Caption         =   "Field number:"
  53.       Height          =   255
  54.       Left            =   180
  55.       TabIndex        =   5
  56.       Top             =   1980
  57.       Width           =   4215
  58.    End
  59.    Begin Label Label2 
  60.       BackColor       =   &H00FFFFFF&
  61.       BackStyle       =   0  'Transparent
  62.       Caption         =   "Separator:"
  63.       Height          =   255
  64.       Left            =   180
  65.       TabIndex        =   3
  66.       Top             =   1320
  67.       Width           =   4215
  68.    End
  69.    Begin Label Label1 
  70.       BackColor       =   &H00FFFFFF&
  71.       BackStyle       =   0  'Transparent
  72.       Caption         =   "Record:"
  73.       Height          =   255
  74.       Left            =   180
  75.       TabIndex        =   2
  76.       Top             =   120
  77.       Width           =   4215
  78.    End
  79. Sub Command1_Click ()
  80.    cr$ = Chr$(13)
  81.    record$ = text1.Text
  82.    separator$ = text2.Text
  83.    fieldnumber% = Val(text3.Text)
  84.    field$ = strfield(record$, separator$, fieldnumber%)
  85.       If field$ = "" Then
  86.          field$ = "Nuthin', 'cause it probably didn't exist."
  87.       End If
  88.    stuff$ = "Field number:" + cr$ + cr$ + text3.Text + cr$ + cr$ + " of the record:" + cr$ + cr$ + text1.Text + cr$ + cr$ + "is:" + cr$ + cr$ + field$
  89.    MsgBox stuff$
  90. End Sub
  91.